import instance from '../../utils/request.js'

// 提交反馈
export const submitFeedbackAPI = (data) => {
  const { userId, title, content, role } = data
  return instance({
    url: `/api/feedback/submit`,
    method: 'POST',
    data: { userId, role, content, title }
  })
}

// 反馈列表
export const getFeedbackListAPI = (params) => {
  const { userId, status, startTime, pageSize, pageNum } = params
  return instance({
    url: `/api/feedback/list`,
    method: 'GET',
    params: { userId, status, startTime, pageSize, pageNum }
  })
}

// 反馈详情
export const getFeedbackDetailAPI = (params) => {
  const { feedbackId } = params
  return instance({
    url: `/api/feedback/${feedbackId}`,
    method: 'GET'
  })
}